package cn.zc.curriculum.service.service;


import cn.tools.core.VO.PageVO;
import cn.zc.curriculum.entity.CurriculumVideo;
import cn.zc.curriculum.entity.Dto.CurriculumVideoDto;
import cn.zc.curriculum.entity.VO.CurriculumVideoVO;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 * 课程视频 服务类
 * </p>
 *
 * @author keno
 * @since 2022-02-14
 */
public interface CurriculumVideoService extends IService<CurriculumVideo> {
    /**
     * 上传视频至本地以及oss以及保利威视
     * @param video
     * @return
     */
    CurriculumVideoVO uploadCurriculumVideo(MultipartFile video);

    /**
     * 删除视频信息以及文件
     * @param id
     */
    void deleteCurriculumVideo(String id);

    /**
     * 创建视频
     * @param curriculumVideoDto
     * @return
     */
    CurriculumVideoDto createCurriculumVideo(CurriculumVideoDto curriculumVideoDto);

    /**
     * 修改视频信息
     * @param curriculumVideoDto
     */
    void updateCurriculumVideo(CurriculumVideoDto curriculumVideoDto);

    /**
     * 根据条件查询视频
     * @param pageVO
     * @param curriculumVideoDto
     * @return
     */
    List<CurriculumVideoDto> findCurriculumVideo(PageVO pageVO, CurriculumVideoDto curriculumVideoDto);

    /**
     * 通过id获取本地文件视频流
     * @param request
     * @param response
     * @param videoId
     */
    void findVideoStream(HttpServletRequest request, HttpServletResponse response, String videoId);
}
